<script>
import {ref} from "vue";

export default {
  emits: [['sendInfo']],
  setup(props, context) {
    let info = ref("Hello, Vue!")

    function sentEvent() {
      context.emit("sendInfo", info)
    }

    return {
      info, sentEvent,
    }
  }
}


</script>

<template>
  <button v-on:click="sentEvent">发送</button>
</template>

<style scoped>

</style>